<template>
<div>
<div class="demo-input-suffix">
  <el-input
    placeholder="请输入名称"
    prefix-icon="el-icon-search"
    v-model="input2"
     style="width: 150px"
    >
  </el-input>

   <el-button plain>添加模板</el-button>
      <el-button plain>编辑</el-button>
      <el-button plain>删除</el-button>
       <el-button plain>预览</el-button>
</div>
     
  <el-table
    ref="multipleTable"
    :data="tableData"
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange">
    <el-table-column
      type="selection"
      width="55">
    </el-table-column>
    <el-table-column
      label="ID"
      width="120">
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
    <el-table-column
      prop="name"
      label="名称"
      width="120"
      style="color:red"
      >
    </el-table-column>
    <el-table-column
      prop="address"
      label="描述"
      show-overflow-tooltip>
    </el-table-column>
       <el-table-column
      prop="name1"
      label="状态"
      width="120"
      >
    </el-table-column>
     <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button
          size="mini"
          @click="handleEdit( scope.row)">编辑</el-button>
      </template>
    </el-table-column>
  </el-table>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage4"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="400">
    </el-pagination>
</div>
</template>

<script>
  export default {
    data() {
      return {
        input2:'',
        tableData: [{
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          name1:'正常'
        }, {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          name1:'正常'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          name1:'正常'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          name1:'正常'
        }, {
          date: '2016-05-08',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          name1:'正常'
        }, {
          date: '2016-05-06',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          name1:'正常'
        }, {
          date: '2016-05-07',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          name1:'正常'
        }],
        multipleSelection: [],
         formInline: {
                Content: ''
            },
      }
    },

    methods: {
      toggleSelection(rows) {
        if (rows) {
          rows.forEach(row => {
            this.$refs.multipleTable.toggleRowSelection(row);
          });
        } else {
          this.$refs.multipleTable.clearSelection();
        }
      },
      handleSelectionChange(val) {
        this.multipleSelection = val;
      },

         show()
         {
             let data={
              size:this.size,
              lendx:this.lendx,
              ProcessName:formInline.this.ProcessName,
            
             }
             Process(data).then((res)=>{
                this.tableData=res.plist;
                this.recount=res.recount;
                 console.log(this.tableData);
             })
               
         },


       handleEdit(index, row) {
        console.log(index, row);
      },
         handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      }
    }
  }
</script>